//
//  BaseViewController.m
//  KingSelected
//
//  Created by 杨鹏 on 2023/10/27.
//

#import "BaseViewController.h"
#import "FollowTipsView.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.hbd_titleTextAttributes = @{NSFontAttributeName:kFontCarter(18),NSForegroundColorAttributeName:[UIColor blackColor]};
    self.hbd_tintColor = [UIColor blackColor];
    self.hbd_barShadowHidden = YES;
    self.hbd_barAlpha = 1.0;
    self.hbd_barTintColor = [UIColor whiteColor];
    
    self.pageSize = 20;
    self.page = 1;
    
    [self initDidLoad];
    [self initViews];
    [self initRequestData];
}

- (void)setNavigationTitle:(NSString *)navigationTitle {
    self.navigationItem.title = navigationTitle;
}
- (void)setBackItemAction:(backAction)back {
    self.backBlock = back;
    UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon-back"] style:UIBarButtonItemStylePlain target:self action:@selector(backItamAction)];
    self.navigationItem.leftBarButtonItem = item;
}

- (void)backItamAction {
    self.backBlock();
}

- (void)initDidLoad{}
- (void)initViews{}
- (void)initRequestData{}

- (void)removeFollowStatsView {
    FollowTipsView *v = [[UIApplication sharedApplication].delegate.window viewWithTag:9999];
    if (v) {
        [v hide];
    }
}

@end
